package com.youbang.settings.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.youbang.settings.dao.SettingDao;
import com.youbang.settings.model.SettingEntity;
import com.youbang.settings.model.ThemeEntity;

@Service
public class SettingServiceImpl implements SettingService{
@Autowired
private SettingDao settingDao;
public int updateByPrimaryKey(SettingEntity setting) {
	
	 int result=0 ;
     try {
         result = settingDao.updateByPrimaryKey(setting);
     } catch (Exception e) {
         e.printStackTrace();
     }
     return result;
}
@Override
public List<ThemeEntity> queryList() {
	// TODO Auto-generated method stub
	
	 try {
		 return settingDao.queryList();
     } catch (Exception e) {
         e.printStackTrace();
     }
     return null;
	
}
@Override
public ThemeEntity queryEntity(int id) {
	// TODO Auto-generated method stub
	try {
		 return settingDao.queryEntity(id);
    } catch (Exception e) {
        e.printStackTrace();
    }
    return null;
}

}
